/*
 * @Author: mikey.zhaopeng 
 * @Date: 2019-01-01 16:16:46 
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-01-12 09:38:36
 */
import 'package:flutter/material.dart';

class H5Item extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        padding: const EdgeInsets.only(
            left: 15.0, right: 15.0, bottom: 20.0, top: 5.0),
        decoration: BoxDecoration(
          border: Border(
            bottom: BorderSide(
              width: 1.0,
              color: Color(0xffeeeeee),
            ),
          ),
        ),
        child: Column(
          children: <Widget>[
            AspectRatio(
              aspectRatio: 2 / 1,
              child: FadeInImage(
                placeholder: AssetImage('assets/images/home/banner.png'),
                image: AssetImage('assets/images/home/banner.png'),
              ),
            ),
            Container(
              height: 42,
              margin: const EdgeInsets.only(top: 15.0),
              child: Row(
                children: <Widget>[
                  Expanded(
                    flex: 1,
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        Text(
                          "新水浒",
                          style: TextStyle(
                            fontSize: 16.0,
                            fontWeight: FontWeight.bold,
                            color: Color(0xff333333),
                          ),
                        ),
                        Text(
                          '30秒最强快感休闲手游',
                          style: TextStyle(fontSize: 12.0,color:Color(0xff999999),),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    height: 28.0,
                    width: 56.0,
                    child: OutlineButton(
                      highlightElevation: 4,
                      padding: const EdgeInsets.all(0),
                      borderSide: BorderSide(
                        color: Color(0xff1faed6),
                      ),
                      color: Color(0xffffffff),
                      textColor: Color(0xff1faed6),
                      onPressed: () {},
                      child: Text(
                        '详情',
                        style: TextStyle(fontSize: 14.0),
                      ),
                    ),
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}

class GameType extends StatelessWidget {
  final String name;
  GameType({Key key, @required this.name}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 5.0, vertical: 0.0),
      margin: const EdgeInsets.only(right: 5.0),
      decoration: BoxDecoration(
          border: Border.all(
            width: 1.0,
            color: Color(0xfffe5ba8),
          ),
          borderRadius: BorderRadius.all(
            Radius.circular(4.0),
          )),
      child: Text(
        name,
        style: TextStyle(fontSize: 12.0),
      ),
    );
  }
}
